<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>用户信息</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
		<link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css">		
		<script type="text/javascript" charset="utf-8" src="extjs/ext-all.js"></script>
		<script type="text/javascript" charset="utf-8" src="extjs/locale/ext-lang-zh_CN.js"></script>
		
		<link rel="stylesheet" href="res/css/list.css" type="text/css" />
		<script type="text/javascript" src="res/js/util.js"></script>
		<script type="text/javascript" src="user/js/userinfo.js"></script>

  </head>
  
  <body>
  		<form action="<%=basePath %>user/updateUser.action" method="post">
			 <div class="all-yonghu">
                    <div class="yonghu" style="padding:10px;width:100%;">
                    		<table style="width:100%;">
	                    		<tr>
	                    			<td style="width:120px;">帐号：</td>
	                    			<td>${user.loginName }<input id="user.id" type="hidden" name="user.id" value="${user.id }" /></td>
	                    			<td style="width:120px;">真实姓名：</td>
	                    			<td><input name="user.realName" id="userName" value="${user.realName }"/></td>
	                    		</tr>
	                    		<tr>
	                    			<td style="width:120px;">邮箱：</td>
	                    			<td><input name="user.email" id="email" value="${user.email }"/></td>
	                    			<td style="width:120px;">手机号：</td>
	                    			<td><input name="user.mobile" id="mobile" value="${user.mobile }"/></td>
	                    		</tr>
	                    		<tr>
	                    			<td style="width:120px;">积分：</td>
	                    			<td><input name="user.score" id="score" value="${user.score }"/></td>
	                    			<td style="width:120px;">注册时间：</td>
	                    			<td>${regTime }</td>
	                    		</tr>
	                    		<tr>
		                    		<td style="width:120px;">用户组：</td>
		                    		<td>
										<select id="groupName" name="user.groupId" style="width:180px;">
			                    			<c:if test="${empty groups}">
			                    				<option value="0" <c:if test="${group.id == 0 }" >selected="selected"</c:if>>请选择</option>
			                    			</c:if>
			                    			<c:if test="${!empty groups}">
			                    				<option value="0" <c:if test="${group.id == 0 }" >selected="selected"</c:if>>请选择</option>
			                    				<c:forEach items="${groups}" var="obj">
			                    					<option value="${obj.id }" <c:if test="${group.id == obj.id }" >selected="selected"</c:if>>${obj.groupName }</option>
			                    				</c:forEach>
			                    			</c:if>
		                    			</select>
		                    		</td>
	                    			<td style="width:120px;">最近登陆时间：</td>
	                    			<td>${lastLoginTime }</td>
	                    		</tr>
		                    	<tr>
		                    		<td style="width:120px;">系部：</td>
		                    		<td>
										<select id="departmentName" name="user.departmentId" style="width:180px;" onchange="javascript:loadChilds(this.value, 'professionalName');">
			                    			<c:if test="${empty departmentlist}">
			                    				<option value="0" <c:if test="${department.id == 0 }" >selected="selected"</c:if>>请选择</option>
			                    			</c:if>
			                    			<c:if test="${!empty departmentlist}">
			                    				<c:forEach items="${departmentlist}" var="obj">
			                    					<option value="${obj.id }" <c:if test="${department.id == obj.id }" >selected="selected"</c:if>>${obj.name }</option>
			                    				</c:forEach>
			                    			</c:if>
			                    		</select>
			                    	</td>
		                    		<td style="width:120px;">专业：</td>
		                    		<td>
										<select id="professionalName" name="user.professionalId" style="width:180px;" onchange="javascript:loadChilds(this.value, 'gradeName');">
			                    			<c:if test="${empty professionallist}">
			                    				<option value="0" <c:if test="${professional.id == 0 }" >selected="selected"</c:if>>请选择</option>
			                    			</c:if>
			                    			<c:if test="${!empty professionallist}">
			                    				<c:forEach items="${professionallist}" var="obj">
			                    					<option value="${obj.id }" <c:if test="${professional.id == obj.id }" >selected="selected"</c:if>>${obj.name }</option>
			                    				</c:forEach>
			                    			</c:if>
			                    		</select>
			                    	</td>
		                    	</tr>
		                    	<tr>
		                    		<td style="width:120px;">年级：</td>
		                    		<td>
										<select id="gradeName" name="user.gradeId" style="width:180px;" onchange="javascript:loadChilds(this.value, 'className');">
			                    			<c:if test="${empty gradelist}">
			                    				<option value="0" <c:if test="${grade.id == 0 }" >selected="selected"</c:if>>请选择</option>
			                    			</c:if>
			                    			<c:if test="${!empty gradelist}">
			                    				<c:forEach items="${gradelist}" var="obj">
			                    					<option value="${obj.id }" <c:if test="${grade.id == obj.id }" >selected="selected"</c:if>>${obj.name }</option>
			                    				</c:forEach>
			                    			</c:if>
			                    		</select>
		                    		</td>
		                    		<td style="width:180px;">班级：</td>
		                    		<td>
		                    			<select id="className" name="user.classId" style="width:180px;">
			                    			<c:if test="${empty clazzlist}">
			                    				<option value="0" <c:if test="${clazz.id == 0 }" >selected="selected"</c:if>>请选择</option>
			                    			</c:if>
			                    			<c:if test="${!empty clazzlist}">
			                    				<c:forEach items="${clazzlist}" var="obj">
			                    					<option value="${obj.id }" <c:if test="${clazz.id == obj.id }" >selected="selected"</c:if>>${obj.name }</option>
			                    				</c:forEach>
			                    			</c:if>
			                    		</select>
			                    	</td>
		                    	</tr>
	                    		<tr>
	                    			<td style="width:120px;">帐号当前状态：</td>
	                    			<td colspan="3">
	                    				<c:if test="${user.isAudit == 0}">
	                    					<a style="color:red;">待审核</a>
	                    				</c:if>
	                    				<c:if test="${user.isAudit == 1}">
	                    					<a style="color:green;">已审核通过</a>
	                    				</c:if>
	                    				<c:if test="${user.isAudit == 2}">
	                    					<a style="color:orange;">未通过审核</a>
	                    				</c:if>
	                    			</td>
	                    		</tr>
	                    		<tr style="text-align: center;">
	                    			<td><input style="border: #bbb 1px solid;" type="submit" name="submit" id="submit" value="修改" /></td>
	                    			<td><input style="border: #bbb 1px solid;" type="button" onclick="javascript:window.close();" name="reset" id="reset" value="关闭" /></td>
	                    		</tr>
	                    	</table>
                    </div>   
             </form>
         <!--正文结束 -->
	</div>
  </body>
</html>
